<template>
   <!-- <Row :gutter="20">
      <Row span="24"><h2 class="con-title">今日基本情况预览</h2></Row>
      <div style="margin: 0 auto;height: 100%;">
        <i-col  :xs="0" :md="0" :lg="1"  style="height: 120px;padding-bottom: 10px;"></i-col>
        <i-col :xs="24" :md="14" :lg="4"  style="height: 120px;padding-bottom: 10px;">
          <Card :shadow="true" class="blue-card-wrapper" :padding="0">
            <div class="content-con">
              <div class="left-area" :style="{background: bluerCardData[0].color,height:'110px', width: '36%',textAlign:'center',verticalAlign:'middle'}">
                <Icon  :type="bluerCardData[0].icon" color="#fff" size="36" style="display: table-cell"></Icon>
              </div>
              <div class="right-area" :style="{width: '64%'}">
                <div>
                  <div class="count-to-wrapper">
                    <p class="content-outer">
                      <span  class="count-to-count-text count-style" style="font-size: 36px;line-height: 70px;font-weight:bold;">{{todayData.registerCount ? todayData.registerCount :0}}</span>
                      <i class="count-to-unit-text"></i>
                    </p>
                  </div>
                  <slot>{{bluerCardData[0].title}}</slot>
                </div>
              </div>
            </div>
          </Card>
        </i-col>
        <i-col :xs="24" :md="14" :lg="9" style="height: 120px;padding-bottom: 10px;">
          <Row style="display: flex">
            <Col class="base-work-item">
              <Card style="background:rgb(61, 184, 193);" :padding=0 :bordered="false">
                <div slot="title" style="color: #fff;">订单</div>
                <Row span="24" style="padding: 2px 0">
                  <Col span="6" class="base-work-each">
                    <h6>申请订单</h6>
                    <div style="font-size: 30px;">{{todayData.applyOrderCount ? todayData.applyOrderCount : 0 }}</div>
                  </Col>
                  <Col span="6" class="base-work-each">
                    <h6>风控订单</h6>
                    <div style="font-size: 30px;">{{todayData.riskAuditPassOrderCount ? todayData.riskAuditPassOrderCount :0}}</div>
                  </Col>
                  <Col span="6" class="base-work-each">
                    <h6>结清订单</h6>
                    <div style="font-size: 30px;">{{todayData.settleOrderCount ? todayData.settleOrderCount : 0}}</div>
                  </Col>
                  <Col span="6" class="base-work-each">
                    <h6>到期订单</h6>
                    <div style="font-size: 30px;">{{todayData.expireOrderCount ? todayData.expireOrderCount : 0}}</div>
                  </Col>
                </Row>
              </Card>
            </Col>
          </Row>
        </i-col>
        <i-col :xs="24" :md="14" :lg="9" style="height: 120px;padding-bottom: 10px;">
          <Row style="display: flex">
            <Col class="base-work-item">
              <Card style="background: #fff;" :padding=0 :bordered="false">
                <div slot="title" style="color: #333;font-weight: bolder">放款数</div>
                <Row span="24" style="padding: 2px 0">
                  <Col span="8" class="base-work-each">
                    <h6 style="color:#666">新户</h6>
                    <div style="font-size: 30px;color:#333">{{todayData.newUserLoanCount ? todayData.newUserLoanCount : 0}}</div>
                  </Col>
                  <Col span="8" class="base-work-each">
                    <h6 style="color:#666">老户</h6>
                    <div style="font-size: 30px;color:#333">{{todayData.oldUserLoanCount ? todayData.oldUserLoanCount : 0}}</div>
                  </Col>
                  <Col span="8" class="base-work-each">
                    <h6 style="color:#666">待放款</h6>
                    <div style="font-size: 30px;color:#333">{{todayData.waitLoanOrderCount ? todayData.waitLoanOrderCount : 0}}</div>
                  </Col>
                </Row>
              </Card>
            </Col>
          </Row>
        </i-col>
        <i-col  :xs="0" :md="0" :lg="1"  style="height: 120px;padding-bottom: 10px;"></i-col>
        <i-col  :xs="0" :md="0" :lg="4"  style="height: 120px;padding-bottom: 10px;margin-top:10px"></i-col>
        <i-col :xs="24" :md="14" :lg="16" style="height: 120px;padding-bottom: 10px;margin-top:10px">
          <Row style="display: flex">
            <Col class="base-work-item">
              <Card style="background: #fff;" :padding=0 :bordered="false">
                <div slot="title"  style="color: #333;font-weight: bolder">催收</div>
                <Row span="24" style="padding: 8px 0 0">
                  <Col span="6" class="base-work-each">
                    <h6 style="color:#666">当天应催订单数</h6>
                    <div style="font-size: 30px;color:#333">{{collection.collectionOrderCount ? collection.collectionOrderCount : 0}}</div>
                  </Col>
                  <Col span="6" class="base-work-each">
                  <h6 style="color:#666">结清订单数</h6>
                    <div style="font-size: 30px;color:#333">{{collection.settleCollectionOrderCount ? collection.settleCollectionOrderCount : 0}}</div>
                  </Col>
                  <Col span="6" class="base-work-each">
                    <h6 style="color:#666">应催金额</h6>
                    <div style="font-size: 30px;color:#333">{{collection.collectionShouldAmount ? collection.collectionShouldAmount : 0}}</div>
                  </Col>
                  <Col span="6" class="base-work-each">
                    <h6 style="color:#666">催回金额</h6>
                    <div style="font-size: 30px;color:#333">{{collection.collectionHaveAmount ? collection.collectionHaveAmount : 0}}</div>
                  </Col>
                </Row>
              </Card>
            </Col>
          </Row>
        </i-col>
        <i-col  :xs="0" :md="0" :lg="4"  style="height: 120px;padding-bottom: 10px;margin-top:10px"></i-col>
      </div>
      <div style="clear: both"></div>
      &lt;!&ndash;<i-col :xs="12" :md="8" :lg="5"  style="height: 120px;padding-bottom: 10px;">
        <Card :shadow="true" class="blue-card-wrapper" :padding="0">
          <div class="content-con">
            <div class="left-area" :style="{background: bluerCardData[1].color, width: '36%',textAlign:'center',verticalAlign:'middle'}">
              <Icon  :type="bluerCardData[1].icon" color="#fff" size="36" style="display: table-cell"></Icon>
            </div>
            <div class="right-area" :style="{width: '64%'}">
              <div>
                <div class="count-to-wrapper">
                  <p class="content-outer">
                    <span  class="count-to-count-text count-style">{{todayData.repaymentAmount}}</span>
                    <i class="count-to-unit-text"></i>
                  </p>
                </div>
                <slot>{{bluerCardData[1].title}}</slot>
              </div>
            </div>
          </div>
        </Card>
      </i-col>&ndash;&gt;
    </Row>
    <Row style="margin-top:40px;" :gutter="20">
      <Row span="24">
        <h2 class="con-title">总计
          <span style="font-size:16px;margin-left: 100px;">注册数：<i style="color:red;">{{totalData.registerTotalCount ? totalData.registerTotalCount :0}}</i></span>
          <span style="font-size:16px;margin-left: 40px;">已回款金额：<i style="color: red;">{{(totalData.repaymentTotalAmount) ? (totalData.repaymentTotalAmount/100).toFixed(2) : 0}}</i>元</span>
          <span style="font-size:16px;margin-left: 40px;">待回款金额：<i style="color: red;">{{(totalData.waitRepaymentTotalAmount) ? (totalData.waitRepaymentTotalAmount/100).toFixed(2) : 0}}</i>元</span>
        </h2>
      </Row>
      <Row span="10">
        <Table size="large" border :columns="dataTitle" :data="data"></Table>
      </Row>
    </Row>-->
  <Table :columns="columns11" :data="data10" border ></Table>
</template>
<script>
  export default {
    data () {
      return {
        tag: {
          'title': '工作台',
          'path': '/work'
        },
        columns11: [
          {
            title: ' ',
            key: 'dateDesc',
            align: 'center',
            minWidth: 80,
          },
          {
            title: '注册数量',
            key: 'registerCount',
            align: 'center',
            minWidth: 110,
          },
          {
            title: '申请量',
            align: 'center',
            children: [
              {
                title: '新户',
                key: 'newUserCount',
                align: 'center',
                minWidth: 110
              },
              {
                title: '老户',
                key: 'oldUserCount',
                align: 'center',
                minWidth: 110
              }
            ]
          },
          {
            title: '放款',
            align: 'center',
            children: [
              {
                title: '数量',
                key: 'loanCount',
                align: 'center',
                minWidth: 110
              },
              {
                title: '金额(元)',
                key: 'loanAmount',
                align: 'center',
                minWidth: 110,
                render:(h,params) => {
                  return h('div',this.toYuan(params.row.loanAmount))
                }
              }
            ]
          },
          {
            title: '到期',
            align: 'center',
            children: [
              {
                title: '入催数',
                key: 'collectionCount',
                align: 'center',
                minWidth: 110
              },
              {
                title: '入催金额(元)',
                key: 'collectionAmount',
                align: 'center',
                minWidth: 110,
                render:(h,params) => {
                  return h('div',this.toYuan(params.row.collectionAmount))
                }
              }
            ]
          },
          {
            title: '还款',
            align: 'center',
            children: [
              {
                title: '结清数',
                key: 'settleCount',
                align: 'center',
                minWidth: 110
              },
              {
                title: '回收金额(元)',
                key: 'settleAmount',
                align: 'center',
                minWidth: 110,
                render:(h,params) => {
                  return h('div',this.toYuan(params.row.settleAmount))
                }
              }
            ]
          },

        ],
        data10: []
      }
    },
    created(){
      this.getToday();
    },
    methods:{
      getToday () {
        this.$post('/bkworkbench/data')
          .then((res) => {
            if(res.code === 0){
              console.log(res)
              this.data10 = res.data;
            }
          })
      },
      // 转化为元
      toYuan(money){
        if(money){
          return (money/100).toFixed(2)
        }else{
          return 0
        }

      },
    },
    mounted () {
      this.$store.commit('changeTag', this.tag.path);
      this.$store.commit('openPage', this.tag);


    }
  }
</script>
